/* Copyright 2009 (c) ENSI de Bourges
 * 		88 boulevard Lahitolle, 18020 Bourges Cedex, France
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * \file constants.h
 * \brief File containing various constants common to all frames
 * \author Steve Dodier <sidnioulz@gmail.com>
 *
 * This file describes contents that are not specific to a frame but that are
 * likely to be used in the whole project. It includes machine and frame related
 * constants, and group IDs. 
 */
#ifndef __CONSTANTS_H
#define __CONSTANTS_H
#ifdef __cplusplus
extern "C" {
#endif


/* Application name and version */
#define APP_NAME					"Live Security"
#define APP_NAME_LOWER				"livesecurity"


/* Environment variables */
#define ENV_CONFIG					"LIVESECURITY_CONFIG_DIR"
#define ENV_DATA					"LIVESECURITY_DATA_DIR"
#define ENV_MACHINES				"LIVESECURITY_MACHINES_DIR"


/* Folders and files */
#define APP_CONF_FILE				"livesecurity.conf"
#define MACHINE_CONF_FILE			"machine.conf"
#define DATA_DIR					"data"
#define MACHINES_DIR				"machines"
#define LOGS_DIR					"logs"
#define REPORTS_DIR					"reports"
#define PLUGINS_DIR					"plugins"


/* Machine constants */
#define ALL_MACHINES_DISPLAY_NAME	"All Machines"
#define ALL_MACHINES_FOLDER_NAME	"__all__machines__"


/* Frame sizes (in pixels and table slots) */
#define FRAME_WIDTH_NORMAL 	300.0
#define FRAME_HEIGHT_NORMAL 225.0

#define FRAME_WIDTH_LARGE 	600.0
#define FRAME_HEIGHT_LARGE 	450.0

#define NORMAL_WIDTH_SLOTS	1
#define NORMAL_HEIGHT_SLOTS	1
#define NORMAL_NB_SLOTS		1

#define LARGE_WIDTH_SLOTS	2
#define LARGE_HEIGHT_SLOTS	2
#define LARGE_NB_SLOTS		4


/* Refresh time */
#define REFRESH_FREQ_AUTO				-1
#define AVG_REFRESH_TIME_NB_PASS		5
#define AUTO_REFRESH_FREQ_TIMEOUT_LEN	600

/* Settings */
#define SETTINGS_GROUP_FRAMES			"Frames"

#define SETTINGS_REFRESH_FREQ_DEFAULT	1000
#define SETTINGS_REFRESH_FREQ_NAME		"RefreshFreq"

#ifdef __cplusplus
}
#endif
#endif
